import Main from '@/views/Main.vue';

// 不作为Main组件的子页面展示的页面单独写，如下
export const loginRouter = {
    path: '/login',
    name: 'login',
    meta: {
        title: 'Login - 登录'
    },
    component: () => import('@/views/login.vue')
};

export const page404 = {
    path: '/*',
    name: 'error-404',
    meta: {
        title: '404-页面不存在'
    },
    component: () => import('@/views/error-page/404.vue')
};

export const page403 = {
    path: '/403',
    meta: {
        title: '403-权限不足'
    },
    name: 'error-403',
    component: () => import('@//views/error-page/403.vue')
};

export const page500 = {
    path: '/500',
    meta: {
        title: '500-服务端错误'
    },
    name: 'error-500',
    component: () => import('@/views/error-page/500.vue')
};

export const preview = {
    path: '/preview',
    name: 'preview',
    component: () => import('@/views/form/article-publish/preview.vue')
};

export const locking = {
    path: '/locking',
    name: 'locking',
    component: () => import('@/views/main-components/lockscreen/components/locking-page.vue')
};

// 作为Main组件的子页面展示但是不在左侧菜单显示的路由写在otherRouter里
export const otherRouter = {
    path: '/',
    name: 'otherRouter',
    redirect: '/home',
    component: Main,
    children: [
        { path: 'home', title: {i18n: 'home'}, name: 'home_index', component: () => import('@/views/personPage/home/home.vue') },
        { path: 'ownspace', title: '个人中心', name: 'ownspace_index', component: () => import('@/views/own-space/own-space.vue') },
        { path: 'message', title: '消息中心', name: 'message_index', component: () => import('@/views/message/message.vue') },
        { path: 'member-add', title: '修改/新增 会员', name: 'member-add-nocache', component: () => import('@/views/personPage/member/member-add/member-add.vue') },
        { path: 'banner-add', title: '修改/新增 幻灯片', name: 'banner-add-nocache', component: () => import('@/views/personPage/banner/banner-add/banner-add.vue') },
        { path: 'goods-add', title: '修改/新增 商品', name: 'goods-add-nocache', component: () => import('@/views/personPage/goods/goods-add/goods-add.vue') },
        { path: 'article-add', title: '修改/新增 文章', name: 'article-add-nosave', component: () => import('@/views/personPage/article/article-add/article-add.vue') },
        { path: 'downList', title: '查看会员关系图', name: 'downList-nocache', component: () => import('@/views/personPage/member/downList/downList.vue') },
        { path: 'money-list', title: '查看财务日志', name: 'money-list-nocache', component: () => import('@/views/personPage/money/money-list/money-list.vue') },
        { path: 'c2cDetails', title: '订单详情', name: 'c2cDetails-nocache', component: () => import('@/views/personPage/transfer/c2cDetails/c2cDetails.vue') },
        { path: 'c2cTransfer-list', title: '点对点交易列表', name: 'c2cTransfer-list-new', component: () => import('@/views/personPage/transfer/c2cTransfer-list/c2cTransfer-list.vue') },
         { path: 'banner', title: '添加', name: 'banner-nocache', icon: 'person', component: () => import('@/views/personPage/banner-list/banner/banner') },
        { path: 'choujiangtianjia', title: '添加', name: 'choujiangtianjia', icon: 'person', component: () => import('@/views/personPage/banner-list/choujiangtianjia/banner') },
        { path: 'hongbaoxiu', title: '修改', name: 'hongbaoxiu', icon: 'person', component: () => import('@/views/personPage/banner-list/hongbaoxiu/banner') },
        { path: 'choujiangjl', title: '抽奖活动记录', name: 'choujiangjl', icon: 'person', component: () => import('@/views/personPage/banner-list/choujiang/bannerLLlist') },
        { path: 'choujiangjlr', title: '查询获奖者', name: 'choujiangjlr', icon: 'person', component: () => import('@/views/personPage/banner-list/choujiangjlr/bannerLLlist') },
        { path: 'add-group-nocache', title: '新增用户组', name: 'add-group-nocache', icon: 'person', component: () => import('@/views/access/add-group/add-group') },
    ]
};

// 作为Main组件的子页面展示并且在左侧菜单显示的路由写在appRouter里
export const appRouter = [

    /*{
        path: '/master',
        icon: 'erlenmeyer-flask',
        name: 'master',
        title: '管理员管理',
        component: Main,
        children: [
            { path: 'master-list', title: '管理员列表', name: 'master-list', icon: 'beaker', component: () => import('@/views/personPage/master/master-list/master-list.vue') },
        ]
    },*/
    {

        path: '/access-management',
        icon: 'erlenmeyer-flask',
        name: 'access',
        title: '权限管理',
        component: Main,
        children: [
            { path: 'admin-management', title: '管理员管理', name: 'admin-management', icon: 'ios-pulse-strong', component: () => import('@/views/access/administrators/administrators') },
            { path: 'user-group-management', title: '用户组管理', name: 'user-group-management', icon: 'person', component: () => import('@/views/access/user-group/user-group') },
        ]
    },
    {
        path: '/banner',
        icon: 'university',
        name: 'banner',
        title: '幻灯片管理',
        component: Main,
        children: [
            { path: 'banner-list', title: '幻灯片列表', name: 'banner-list', icon: 'ribbon-a', component: () => import('@/views/personPage/banner/banner-list/banner-list.vue') },
            { path: 'banner-add', title: '新增幻灯片', name: 'banner-add', icon: 'ribbon-b', component: () => import('@/views/personPage/banner/banner-add/banner-add.vue') },
        ]
    },
    {
        path: '/article',
        icon: 'folder',
        name: 'article',
        title: '文章管理',
        component: Main,
        children: [
            // { path: 'information-list', title: '新闻公告列表', name: 'information-list', icon: 'document-text', component: () => import('@/views/personPage/article/information-list/information-list.vue') },
            { path: 'article-list', title: '新闻公告管理', name:'article-list', icon: 'document-text', component: () => import('@/views/personPage/article/article-list/article-list.vue') },
            // { path: 'article-register', title: '注册协议', name: 'article-register', icon: 'document-text', component: () => import('@/views/personPage/article/article-register/article-register.vue') },
            // { path: 'article-special', title: '美容项目', name: 'article-special', icon: 'document-text', component: () => import('@/views/personPage/article/article-special/article-special.vue') },
            { path: 'article-add', title: '新增文章', name: 'article-add-nosave', icon: 'pricetags', component: () => import('@/views/personPage/article/article-add/article-add.vue') },
        ]
    },
    {
        path: '/member',
        icon: 'person-stalker',
        name: 'member',
        title: '会员管理',
        component: Main,
        children: [
            { path: 'member-list', title: '会员列表', name: 'member-list', icon: 'person', component: () => import('@/views/personPage/member/member-list/member-list.vue') },
            //{ path: 'member-add', title: '新增会员', name: 'member-add', icon: 'person-add', component: () => import('@/views/personPage/member/member-add/member-add.vue') },
            { path: 'trueName-list', title: '实名认证列表', name: 'trueName-list', icon: 'ribbon-a', component: () => import('@/views/personPage/member/trueName-list/trueName-list.vue') },
            // { path: 'offlinemoney-add', title: '新增线下项目收款', name: 'offlinemoney-add', icon: 'ribbon-b', component: () => import('@/views/personPage/member/offlinemoney-add/offlinemoney-add.vue') },
            { path: 'downList', title: '推荐关系图', name: 'downList-nocache', icon: 'person', component: () => import('@/views/personPage/member/downList/downList.vue') },
        ]
    },
    {
        path: '/config',
        icon: 'erlenmeyer-flask',
        name: 'config',
        title: '配置项管理',
        component: Main,
        children: [
            { path: 'config-list', title: '配置项管理', name: 'config-list', icon: 'beaker', component: () => import('@/views/personPage/config/config-list/config-list.vue') },
        ]
    },

    {
        path: '/money',
        icon: 'pricetags',
        name: 'money',
        title: '日志管理',
        component: Main,
        children: [
            { path: 'money-list', title: '财务列表', name: 'money-list', icon: 'pricetag', component: () => import('@/views/personPage/money/money-list/money-list.vue') },
            { path: 'log-list', title: '登录日志', name: 'log-list', icon: 'pricetag', component: () => import('@/views/personPage/money/log-list/log-list.vue') },
            { path: 'operate-list', title: '操作日志', name: 'operate-list', icon: 'pricetag', component: () => import('@/views/personPage/money/operate-list/operate-list.vue') },
            { path: 'change-list', title: '修改资金日志', name: 'change-list', icon: 'pricetag', component: () => import('@/views/personPage/money/change-list/change-list.vue') },
        ]
    },
    {

        path: '/getmoney',
        icon: 'erlenmeyer-flask',
        name: 'getmoney',
        title: '充值管理',
        component: Main,
        children: [
            { path: 'getmoney-list', title: '提现列表', name: 'getmoney-list', icon: 'ios-pulse-strong', component: () => import('@/views/personPage/getmoney/getmoney-list/getmoney-list.vue') },
            { path: 'chongzhi', title: '充值记录', name: 'chongzhi', icon: 'person', component: () => import('@/views/personPage/banner-list/chongzhi/bannerLL') },
        ]
    },
    {

        path: '/mallManage',
        icon: 'erlenmeyer-flask',
        name: 'mallManage',
        title: '商城管理',
        component: Main,
        children: [
            { path: 'product-list', title: '商品列表', name: 'product-list', icon: 'beaker', component: () => import('@/views/personPage/mall/article-list/article-list') },
            { path: 'order-list', title: '订单列表', name: 'order-list', icon: 'beaker', component: () => import('@/views/personPage/mall/orders-list/article-list') },
        ]
    },



    {

        path: '/ore',
        icon:  'erlenmeyer-flask',
        name: 'ore',
        title: '投资管理',
        component: Main,
        children: [
            // { path: 'ore-list', title: '投资列表', name: 'ore-list', icon: 'erlenmeyer-flask', component: () => import('@/views/personPage/ore/ore-list/ore-list.vue') },
            { path: 'buy-list', title: '购买投资列表', name: 'buy-list', icon: 'erlenmeyer-flask', component: () => import('@/views/personPage/ore/buy-list/buy-list.vue') },
        ]
    },

    {
        path: '/transfer',
        icon: 'android-options',
        name: 'transfer',
        title: '交易管理',
        component: Main,
        children: [
            /*{ path: 'autoMarket', title: '撮合交易对', name: 'autoMarket', icon: 'social-chrome', component: () => import('@/views/personPage/transfer/autoMarket/autoMarket.vue') },
            { path: 'autoBuySell-list', title: '撮合买卖列表', name: 'autoBuySell-list', icon: 'umbrella', component: () => import('@/views/personPage/transfer/autoBuySell-list/autoBuySell-list.vue') },
            { path: 'autoTransfer-list', title: '撮合交易列表', name: 'autoTransfer-list', icon: 'ios-keypad', component: () => import('@/views/personPage/transfer/autoTransfer-list/autoTransfer-list.vue') },*/
            { path: 'c2c', title: '点对点交易对', name: 'c2c', icon: 'social-chrome', component: () => import('@/views/personPage/transfer/c2c/c2c.vue') },
            { path: 'c2cBuySell-list', title: '点对点卖出列表', name: 'c2cBuySell-list', icon: 'chatbox-working', component: () => import('@/views/personPage/transfer/c2cBuySell-list/c2cBuySell-list.vue') },
            { path: 'c2cTransfer-list', title: '点对点交易列表', name: 'c2cTransfer-list', icon: 'gear-a', component: () => import('@/views/personPage/transfer/c2cTransfer-list/c2cTransfer-list.vue') },
        ]
    },
    /*{

        path: '/coinManage',
        icon: 'erlenmeyer-flask',
        name: 'coinManage',
        title: '币种管理',
        component: Main,
        children: [
            { path: 'coin-list', title: '币种管理', name: 'coin-list', icon: 'beaker', component: () => import('@/views/personPage/coinManage/coin-list/coin-list.vue') },
        ]
    },*/




    // {
    //
    //     path: '/managemessage',
    //     icon: 'gear-a',
    //     name: 'messagemanage',
    //     title: '留言管理',
    //     component: Main,
    //     children: [
    //         // { path: 'getmessage', title: '收件箱', name: 'getmessage', icon: 'gear-b', component: () => import('@/views/personPage/messagemanage/getmessage/getmessage.vue') },
    //         { path: 'sendmessage', title: '留言管理', name: 'sendmessage', icon: 'gear-a', component: () => import('@/views/personPage/messagemanage/sendmessage/sendmessage.vue') },
    //     ]
    // },
    // {
    //
    //     path: '/offlinemoney',
    //     icon: 'gear-a',
    //     name: 'offlinemoney',
    //     title: '线下项目收款管理',
    //     component: Main,
    //     children: [
    //         { path: 'offlinemoney-list', title: '线下项目收款方法', name: 'offlinemoney-list', icon: 'ribbon-a', component: () => import('@/views/personPage/offlinemoney/offlinemoney-list/offlinemoney-list.vue') },
    //         { path: 'offlinemoney-add', title: '新增', name: 'offlinemoney-add', icon: 'ribbon-b', component: () => import('@/views/personPage/offlinemoney/offlinemoney-add/offlinemoney-add.vue') },
    //     ]
    // },
    // {
    //     path: '/theme',
    //     icon: 'android-options',
    //     name: 'theme',
    //     title: '主题设置',
    //     component: Main,
    //     children: [
    //         { path: 'theme-list', title: '主题管理', name: 'theme-list', icon: 'ionic', component: () => import('@/views/personPage/theme/theme-list/theme-list.vue') },
    //         { path: 'theme-goods-list', title: '主题商品', name: 'theme-goods-list', icon: 'umbrella', component: () => import('@/views/personPage/theme/theme-goods-list/theme-goods-list.vue') },
    //         //{ path: 'sfdsdfsd', title: '拖拽表格', name: 'sfdsdfsd', icon: 'umbrella', component: () => import('@/views/my-components/draggable-list/draggable-list') },
    //     ]
    // },
    // {
    //     path: '/area',
    //     icon: 'earth',
    //     name: 'area',
    //     title: '地区管理',
    //     component: Main,
    //     children: [
    //         { path: 'area-list', title: '地区列表', name: 'area-list', icon: 'earth', component: () => import('@/views/personPage/area/area-list/area-list.vue') },
    //     ]
    // },
    /*{
        path: '/area',
        icon: 'earth',
        name: 'area',
        title: '游戏列表',
        component: Main,
        children: [
            { path: 'bannerLL', title: '转盘游戏', name: 'bannerLL', icon: 'person', component: () => import('@/views/personPage/banner-list/bannerLL/bannerLL') },
            { path: 'bannerLLlist', title: '转盘奖励列表', name: 'bannerLLlist', icon: 'person', component: () => import('@/views/personPage/banner-list/bannerLL/bannerLLlist') },
            { path: 'hongbao', title: '红包游戏', name: 'hongbao', icon: 'person', component: () => import('@/views/personPage/banner-list/hongbao/bannerLL') },
            { path: 'hongbaocai', title: '红包财务日志', name: 'hongbaocai', icon: 'person', component: () => import('@/views/personPage/banner-list/hongbaocai/bannerLLlist') },
            { path: 'bannerLL1', title: '抽奖活动列表', name: 'bannerLL1', icon: 'person', component: () => import('@/views/personPage/banner-list/choujiang/bannerLL') },
        ]
    },*/
    // {
    //     path: '/delivery',
    //     icon: 'android-plane',
    //     name: 'delivery',
    //     title: '快递管理',
    //     component: Main,
    //     children: [
    //         { path: 'delivery-list', title: '快递列表', name: 'delivery-list', icon: 'android-boat', component: () => import('@/views/personPage/delivery/delivery-list/delivery-list.vue') },
    //     ]
    // },
    // {
    //     path: '/agent',
    //     icon: 'person-stalker',
    //     name: 'agent',
    //     title: '代理管理',
    //     component: Main,
    //     children: [
    //         { path: 'agent-all-list', title: '代理总表', name: 'agent-all-list', icon: 'person-stalker', component: () => import('@/views/personPage/agent/agent-all-list/agent-all-list.vue') },
    //         { path: 'agent-list', title: '代理列表', name: 'agent-list', icon: 'person-stalker', component: () => import('@/views/personPage/agent/agent-list/agent-list.vue') },
    //         { path: 'agent-tixian', title: '代理提现', name: 'agent-tixian', icon: 'person-stalker', component: () => import('@/views/personPage/agent/agent-tixian/agent-tixian.vue') },
    //     ]
    // },
    // {
    //     path: '/record',
    //     icon: 'clipboard',
    //     name: 'record',
    //     title: '日志管理',
    //     component: Main,
    //     children: [
    //         { path: 'do-record', title: '操作日志', name: 'do-record', icon: 'document-text', component: () => import('@/views/personPage/record/do-record/do-record.vue') },
    //         { path: 'login-record', title: '登录日志', name: 'login-record', icon: 'document-text', component: () => import('@/views/personPage/record/login-record/login-record.vue') },
    //     ]
    // },
    // {
    //     path: '/tuishou',
    //     icon: 'person-stalker',
    //     name: 'tuishou',
    //     title: '推手管理',
    //     component: Main,
    //     children: [
    //         { path: 'tuishou-tixian', title: '推手提现', name: 'tuishou-tixian', icon: 'person-stalker', component: () => import('@/views/personPage/tuishou/tuishou-tixian/tuishou-tixian.vue') },
    //     ]
    // },
];

// 所有上面定义的路由都要写在下面的routers里
export const routers = [
    loginRouter,
    otherRouter,
    preview,
    locking,
    ...appRouter,
    page500,
    page403,
    page404
];
